<template>
  <div class="card-box">
    <div class="card-box-header" :class="{ 'card-box-header-bg-long': isLongHeader }">
      <div class="title">{{ title }}</div>
      <slot name="header"></slot>
    </div>
    <div class="card-box-main">
      <slot></slot>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    title: {
      type: String,
      default: '标题'
    },
    isLongHeader: {
      type: Boolean,
      default: false
    }
  }
}
</script>
<style lang="scss" scoped>
.card-box {
  background: url(~@/assets/images/yyzhkb/card-box-main-bg.svg) center center no-repeat;
  background-size: cover;

  .card-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: url(~@/assets/images/yyzhkb/card-box-header-bg.svg) center center no-repeat;
    background-size: 100% 100%;
    font-size: tvw(16);
    color: #fff;
    height: tvh(30);
    padding-left: tvw(24);
    .title {
      font-family: 'KbTitleFont';
    }
  }
  .card-box-header-bg-long {
    background: url(~@/assets/images/yyzhkb/card-box-header-bg-long.svg) center center no-repeat;
    background-size: 100% 100%;
  }

  .card-box-main {
    // background: radial-gradient(57.26% 271.22% at 55.34188034188035% 58.048780487804876%, rgba(0, 16, 50, 1) 0%, rgba(4, 24, 69, 1) 100%);
  }
}
</style>